Refactor breeze k8s dev to enable one-step Kubernetes setup and fix Skaffold issues #59869
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
related: #59747
Why
It would be really nice to make
breeze k8s devas ONE STEP command to setup Airflow on Kubernetes development environment!Additionally, while testing out the new
breeze k8s dev --dags-path files/dags --deploycommand locally, I encounter some errors:ImagePullBackOfferror due to hardcoded image tag aslatest[Q] build tag vs. deployment tag GoogleContainerTools/skaffold#6804
Namespace not found error for Helm
skaffold not creating namespace for helm release GoogleContainerTools/skaffold#8515
It's not an error, but the current
--dags-pathis default asdagsrelated path instead offiles/dagsso we need to explicitly set tofiles/dagsif we need to test out the same dags asbreeze start-airflow.What
To fix the above errors:
setValueTemplatesskaffold config to resolve image instead of hardcoding aslatestimage tag to avoidImagePullBackOfferror.deploy.helm.releases.createNamespaceskaffold config--dags-pathfromdagstofiles/dags(align as breeze container mount point)To make
breeze k8s devas one step command:create-clustercommand if found that cluster hasn't been created.breeze k8s create-clustercommand first, also show the hint ofbreeze k8s devso that user don't need to runbreeze k8s configure-cluster,breeze k8s build-k8s-image...breeze k8s deploy-airflow.